package xyz.comfyz.web.commons.security.support;

import xyz.comfyz.web.commons.security.model.Authentication;
import xyz.comfyz.web.commons.security.model.SecurityToken;

import java.util.Collections;

/**
 * @author :    comfy
 * @date :      2018-05-12 16:04:49
 * @since :     1.8
 * <p>
 * 用户枚举
 */
public enum SecurityUser {
    ANONYMOUS(new Authentication<>(new SecurityToken(null, "ANONYMOUS", false), Collections.emptySet(), null));

    private final Authentication token;

    SecurityUser(Authentication token) {
        this.token = token;
    }

    public Authentication authentication() {
        return this.token;
    }

}
